package cn.mall.goods.mapper;

import cn.mall.goods.domain.Goods;
import cn.mall.base.mapper.BaseMapper;
import cn.mall.goods.query.GoodsQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Jarvis-Smith
 * @since 2023-12-04
 */
public interface GoodsMapper extends BaseMapper<Goods> {

    List<Goods> loadByIds(@Param("ids")List<Long> ids, @Param("state") int state);

    void updateState(@Param("goodsIds") List<Long> goodsIds, @Param("state") int state);

    Goods loadByShopIdAndType(@Param("shopId") Long shopId, @Param("type") Integer type);

    long loadTotalByuser(GoodsQuery query);

    List<Goods> pageListByuser(GoodsQuery query);

    List<Goods> pageListv2(GoodsQuery query);

    long loadTotalV2(GoodsQuery query);
}
